﻿using System.Collections.ObjectModel;
using System.ComponentModel;

namespace ModuleBase
{
    public interface IModuleBase
    {
        string Name { get; set; }
        string Id { get; set; } // 唯一标识
        ModuleStatus Status { get; set; }
        string Category { get; set; }
        string Alias { get; set; } // 别名
        string DisplayName { get; } // 显示名称，优先别名
        string Description { get; }
        string TemplateName { get; set; } // 新增
        void Initialize();
        Dictionary<string, object> GetProperties();
        Dictionary<string, List<object>> PropertyOptions { get; }
        Dictionary<string, string> DisplayNameToPropertyNameMap { get; set; }
        void SetProperties(Dictionary<string, object> properties);
        //Task<Dictionary<string, object>> ExecuteAsync(Dictionary<string, object> inputs, ExecutionContext context);
        //Dictionary<string, object> Execute(Dictionary<string, object> inputs, ExecutionContext context);
        Task<bool> ExecuteAsync();
        bool Execute();
        event Action<string> ExecutionResultEvent;
        void OnPropertyChanged(string propertyName);
    }
}